<?php

namespace App\Http\Controllers\DingTalk;

use App\Http\Controllers\Controller;
use App\Models\DingTalkLog;

class LogController extends Controller
{
    //
    public function index()
    {
        if (post("?")) {
            return DingTalkLog::search(post("search"))
        
                ->relatedJoin()
                ->getGrid();
        } else {

            return view('DingTalk.ServerController.index', F());
        }
    }

    public function edit()
    {
        return json_decode(DingTalkLog::where(["id" => get('id')])->first()['data']);
    }
}
